package com.vastcom.sigma.admin.dao;

import com.vastcom.sigma.admin.model.Searchlog;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface SearchLogDao extends JpaRepository<Searchlog,String> {

    @Query("select s from Searchlog s where s.scpcid =:scpcid")
    List<Searchlog> getSearchlogsByScpcid(@Param("scpcid")String scpcid);


    @Query("select s from Searchlog s order by s.searchtime desc ")
    List<Searchlog> getSearchlogsBySearchtime();

}
